home *** CD-ROM | disk | FTP | other *** search
/ Hackers Magazine 57 / CdHackersMagazineNr57.iso / Software / Programming / RJTextEd.exe / {userappdata} / RJ TextEd / Scripts / examples / NextMethod.pas next >
Encoding:
Pascal/Delphi Source File  |  2007-10-23  |  571 b   |  23 lines

  1. // A simple pascal script to navigate to the next 
  2. // method in your source code.
  3. // You can assign a keyboard shortcut to this script.
  4. // E.g. Ctrl+Alt+Down
  5.  
  6. procedure GotoNextMethod;
  7. begin
  8.    if not Document.GotoNextMethod(False) then
  9.    begin
  10.       if MessageDlg('Could not find a method! Do you want to start again from the top?',mtInformation,mbYes or mbNo,0) = mrYes then
  11.       begin
  12.          Document.CursorDocStart(False);
  13.          Document.GotoNextMethod(False);
  14.       end; 
  15.    end;   
  16. end;
  17.  
  18. // Main function
  19. begin
  20.    GotoNextMethod;
  21. end.
  22.  
  23.